package whf.framework.validate;

import java.util.Set;

import whf.framework.entity.Entity;
import whf.framework.meta.entity.IReadonlyProperty;

/**
 * @author wanghaifeng
 *
 */
public interface ValidateService {
	public final static String PROPERTY_REQUIRED = "validate.property.required";
	
	public final static String PROPERTY_RANGE_BETWEEN="validate.property.range.between";
	
	public final static String PROPERTY_RANGE_GREAT_THAN = "validate.property.range.great.than";
	
	public final static String PROPERTY_RANGE_LESS_THAN = "validate.property.range.less.than";
	
	public final static String PROPERTY_LENGTH_LESS_THAN = "validate.property.length.less.than";
	
	public final static String PROPERTY_REGEX_NOT_MATCH = "validate.property.regex_not_match";
	
	/**
	 * 合法性检查接口
	 * @modify wanghaifeng Sep 28, 2006 10:20:16 AM
	 * @param bo 当前业务对象
	 * @param properties 需要处理合法性检查的属性集合
	 * @param objectId 对象标识,用以处理在多个对象而且属性名称相同时的标识
	 * @throws ValidateException
	 */
	public void validate(Entity bo, Set<IReadonlyProperty> properties, String objectId) throws ValidateException;
}
